import request from '@/utils/request';
import { stringify } from 'qs';

//退货申请单列表分页
export async function queryApplyListlData(params) {
  return request(`/zjf-oms/refundOrder/page?${stringify(params)}`);
}

//退货申请单明细
export async function getRefundApplyDetailsOp(params) {
  return request(`/zjf-oms/refundOrder/detail?${stringify(params)}`);
}

//编辑
export async function refundOrderSave(params) {
  return request(`/zjf-oms/refundOrder/update`, {
    method: 'POST',
    data: params,
  });
}

//直发单编辑
export async function zhifaRefundEdit(params) {
  return request(`/zjf-oms/refundOrder/zhiEditRefundOrder`, {
    method: 'POST',
    data: params,
  });
}

//首页获取所有的快递公司列表
export async function getIndexExpressList() {
  return request(`/blade-logistics/express/listBase`);
}

//重新申请
export async function applyAgainOp(params) {
  return request(`/zjf-oms/refundOrder/zhiRefundOrderReapply`,{
    method: 'POST',
    data: params,
  });
}

//取消
export async function cancelRefundApplyOp(params) {
  return request(`/zjf-oms/refundOrder/cancel?${stringify(params)}`);
}

//直发单取消
export async function zhifaCancelRefundApplyOp(params) {
  return request(`/zjf-oms/refundOrder/zhiRefundOrderCancel?${stringify(params)}`);
}

//获取列表显示及分页
export async function queryRefundListlData(params) {
  return request(`/zjf-oms/refunddetail/list?${stringify(params)}`);
}

//获取详情数据
export async function queryRefundDetailData(params) {
  return request(`/zjf-oms/refunddetail/detail?${stringify(params)}`);
}

//获取退货进展列表
export async function queryListByUniqueCode(params) {
  return request(`/blade-log/refund/log/listByCondition`,{
    method: 'POST',
    data: params,
  });
}

//店铺名称模糊
export async function getStoreName() {
  return request(`/zjf-erp-spd/spdPrint/fetchRemoteStoreList`);
}

//根据类型查询用户渠道列表
export async function getTypeChannel(params) {
  return request(`/zjf-wms/channel/queryTypeChannel?${stringify(params)}`);
}

//公共日志接口
export async function getLogDataOp(params) {
  return request(`/blade-log/operation/log/list?${stringify(params)}`);
}

//导出任务中心
export async function exprotTableDataOp(params) {
  return request(`/zjf-oms/refundOrder/export/page?${stringify(params)}`);
}

